package August;

import java.util.Scanner;
import java.util.WeakHashMap;

public class Day0817 {
    //养兔子
    public static void main1(String[] args) {
        long[] fei = new long[91];
        fei[1] = 1;
        fei[2] = 2;
        for (int i = 3; i < fei.length; i++) {
            fei[i] = fei[i-1]+fei[i-2];
        }
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            System.out.println(fei[n]);
        }
    }



    //收件人列表
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = Integer.parseInt(scanner.nextLine());
            String[] str = new String[n];
            for (int i = 0; i < str.length; i++) {
                str[i] = scanner.nextLine();
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < str.length; i++) {
                if (str[i].contains(",")||str[i].contains(" ")){
                    sb.append("\"");
                    sb.append(str[i]);
                    sb.append("\"");
                    if (i!=str.length-1)
                        sb.append(", ");
                }else {
                    sb.append(str[i]);
                    if (i!=str.length-1)
                        sb.append(", ");
                }
            }
            System.out.println(sb.toString());
        }
    }
}
